package net.lijingye.education.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

@Entity
@Table(name = "province")
public class Province implements Serializable {
    @Id
    @Column(name = "provinceId")
    private String id;
    @Column(name = "provinceName")
    private String name;
    @OneToMany
    @JoinColumn(name = "provinceId")
    private List<City> cityList;

    public Province() {
    }

    public Province(String id, String name, List<City> cityList) {
        this.id = id;
        this.name = name;
        this.cityList = cityList;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<City> getCityList() {
        return cityList;
    }

    public void setCityList(List<City> cityList) {
        this.cityList = cityList;
    }

}